package com.ruoyi.djb.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.djb.mapper.DjbRegistryMapper;
import com.ruoyi.djb.domain.DjbRegistry;
import com.ruoyi.djb.service.IDjbRegistryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 登记管理Service业务层处理
 * 
 * @author xxd
 * @date 2023-12-08
 */
@Service
public class DjbRegistryServiceImpl implements IDjbRegistryService 
{
    @Autowired
    private DjbRegistryMapper djbRegistryMapper;

    /**
     * 查询登记管理
     * 
     * @param id 登记管理主键
     * @return 登记管理
     */
    @Override
    public DjbRegistry selectDjbRegistryById(Integer id)
    {
        return djbRegistryMapper.selectDjbRegistryById(id);
    }

    /**
     * 查询登记管理列表
     * 
     * @param djbRegistry 登记管理
     * @return 登记管理
     */
    @Override
    public List<DjbRegistry> selectDjbRegistryList(DjbRegistry djbRegistry)
    {
        return djbRegistryMapper.selectDjbRegistryList(djbRegistry);
    }

    /**
     * 新增登记管理
     * 
     * @param djbRegistry 登记管理
     * @return 结果
     */
    @Override
    public int insertDjbRegistry(DjbRegistry djbRegistry)
    {
        djbRegistry.setCreateTime(DateUtils.getNowDate());
        return djbRegistryMapper.insertDjbRegistry(djbRegistry);
    }

    /**
     * 修改登记管理
     * 
     * @param djbRegistry 登记管理
     * @return 结果
     */
    @Override
    public int updateDjbRegistry(DjbRegistry djbRegistry)
    {
        return djbRegistryMapper.updateDjbRegistry(djbRegistry);
    }

    /**
     * 批量删除登记管理
     * 
     * @param ids 需要删除的登记管理主键
     * @return 结果
     */
    @Override
    public int deleteDjbRegistryByIds(String ids)
    {
        return djbRegistryMapper.deleteDjbRegistryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除登记管理信息
     * 
     * @param id 登记管理主键
     * @return 结果
     */
    @Override
    public int deleteDjbRegistryById(Integer id)
    {
        return djbRegistryMapper.deleteDjbRegistryById(id);
    }
}
